package com.example.nio.message;

import com.example.nio.utils.IdUtil;
import lombok.Data;

import java.io.Serializable;


/***
 * 请求
 */
@Data
public class Request implements Serializable {

    private String requestId = IdUtil.getId();

    private long timeStamp = System.currentTimeMillis();

    private boolean isPing = false;

    private Object data;

    public static Request buildPing() {
        Request request = new Request();
        request.setPing(true);
        return request;
    }
}
